﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class my_ascx_my_cities : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int no = int.Parse(Request["no"]);
        

        ctpDataContext db = new ctpDataContext();

        var mi = from p in db.my_citiport_mines
                 join q in db.ct_profiles on p.ct_no equals q.no
                 where p.userno == no
                 orderby p.addtime descending
                 select new
                 {
                     title = q.title.Trim().Replace(",", ""),
                     q.no,
                     p.recommend,
                     main_pic_fn = q.main_pic_fn.Trim(),
                     tourl="../default.aspx?no="+no.ToString()+"&cno="+q.no.ToString()

                 };

        this.DataList2.DataSource = mi;
        this.DataBind();
    }
}
